package com.mall.controller;

import com.mall.common.model.GlobalResponse;
import com.mall.service.ICategoryService;
import com.mall.vo.CategoryVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/category")
public class CategoryController {

    @Autowired
    private ICategoryService categoryService;

    @RequestMapping("/overview")
    public GlobalResponse<List<CategoryVO>> overview(){
        return categoryService.selectAll();
    }

}
